package com.liangsong.designpattern.composite;

import java.util.ArrayList;
import java.util.List;

public class Department extends EmpComponent{
    private ArrayList<Team> department = new ArrayList<>();

    public Department(ArrayList<Team> department){
        this.department = department;
    }

    @Override
    public void showAllName() {
        for (Team t:department
             ) {
            t.showAllName();
        }
    }
}
